package com.rc.saas.tenant.service.hlht;

import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.mapper.hlht.HlhtTenantOpenPileMapper;
import com.rc.saas.tenant.model.elec.ElecPile;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpen;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpenPile;
import com.rc.saas.tenant.model.hlht.HlhtTenantOpenPileExample;
import com.rc.saas.tenant.search.hlht.HlhtTenantOpenPileSearch;
import com.rc.saas.tenant.vo.hlht.HlhtTenantOpenPileVo;

import java.util.List;

/**
 * @author wangzhengwei
 * @create 2021/8/12
 */
public interface HlhtTenantOpenPileService extends BaseService<Long, HlhtTenantOpenPile, HlhtTenantOpenPileExample, HlhtTenantOpenPileMapper> {
    /**
     * 批量插入
     * @param hlhtTenantOpen
     * @param elecPileList
     * @param loginName
     */
    void insertBatchByElecPileList(HlhtTenantOpen hlhtTenantOpen, List<ElecPile> elecPileList,String hlhtOpenforType, String loginName);

    /**
     * 根据站点和互联关系，批量删除开放桩
     * @param hlhtTenantOpen
     * @param elecStationIdList
     */
    void deleteBatchByElecStationIdList(HlhtTenantOpen hlhtTenantOpen, List<Long> elecStationIdList);

    /**
     * 根据站点和互联关系，批量更新hlhtOpenforType
     * @param hlhtTenantOpen
     * @param openedStationIdList
     * @param hlhtOpenforType
     */
    void updatePileHlhtOpenforTypeBatchByOpenStationIdList(HlhtTenantOpen hlhtTenantOpen,List<Long> openedStationIdList, String hlhtOpenforType);

    PageInfo<HlhtTenantOpenPileVo> listPageHlhtTenantOpenPile(HlhtTenantOpenPileSearch hlhtTenantOpenPileSearch);

    /**
     * 获取已开放的pileId
     * @param openPileIdList
     * @return
     */
    List<Long> getElecPileIdByOpenPile(List<Long> openPileIdList);

    /**
     * 批量删除
     * @param openPileIdList
     */
    void deleteByBatch(List<Long> openPileIdList);

    /**
     * 批量更新HlhtOpenforTyp
     */
    void updateHlhtOpenforTypeBatchByOpenPileIdList(List<Long> openPileIdList, String hlhtOpenforType);

}
